#
# @lc app=leetcode.cn id=1822 lang=python3
#
# [1822] 数组元素积的符号
#

# @lc code=start
class Solution:
    def arraySign(self, nums: List[int]) -> int:
        s=1
        for i in nums:
            if i==0:
                return 0
            s*=i
        if s>0:
            return 1
        else:
            return -1

# @lc code=end

